<?php
$uploads_dir = '../uploads/';
foreach ($_FILES["images"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
        $name = $_FILES["images"]["name"][$key];
        if (file_exists($uploads_dir. $_FILES["images"]["name"][$key]))
        {
        echo $name . " already exists. ";
        }
        else
        {
        move_uploaded_file( $_FILES["images"]["tmp_name"][$key], $uploads_dir.$name);
        echo "<div class='row' id='response' >";
        echo "<h1>Upload ảnh thành công</h1>";
        echo "<img src='uploads/$name'>";
        echo"</div>";
        }
        
    }
}
?>